package com.gzsxy.esjy.service.auth.shiro.config;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * @author xiaolong
 * @version 1.0
 * @description: 自定义适应多认证条件
 * @date 2022/3/1 17:27
 */
public class MyAuthenticationToken implements AuthenticationToken {

    /**
     * @description: 新增的校验因子
     * @param
     * @return
     */
    private String school;

    private String username;

    private char[] password;




    public void setUsername(String username) {
        this.username = username;
    }

    public void setPassword(char[] password) {
        this.password = password;
    }

    @Override
    public Object getPrincipal() {
        return getUsername();
    }

    @Override
    public Object getCredentials() {
        return getPassword();
    }

    public char[] getPassword() {
        return password;
    }

    public String getUsername() {
        return username;
    }

    public MyAuthenticationToken() {
    }

    public MyAuthenticationToken(String school, String username, char[] password) {
        this.school = school;
        this.username = username;
        this.password = password;
    }


    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }
}
